package com.groupscore.score.service;


import com.groupscore.score.dao.ChapterDao;
import com.groupscore.score.dao.ExceptionCatDao;
import com.groupscore.score.pojo.Chapter;
import com.groupscore.score.pojo.ExceptionCat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ChapterService {

    @Autowired
    private ChapterDao chapterDao;

    public List<Chapter> findAll(){
        return chapterDao.findAll();
    }

    public Chapter findOne(Integer id){

        return chapterDao.findById( id ).get();
    }
}
